package responsibilitychain.example;

/**
 * @author Chen Guang
 * @date 2019/4/23 0023 上午 10:53
 */
public class Test {
    public static void main(String[] args) {
        Manager jinli = new CommonManager("金利");
        Manager zongjian = new Majordomo("宗剑");
        Manager zongjingli = new GeneralManager("钟精励");
        //设置上级
        jinli.setSuperior(zongjian);
        zongjian.setSuperior(zongjingli);
        //请假请求
        Request request = new Request();
        request.setRequestType("请假");
        request.setRequestContent("小菜请假");
        request.setNumber(1);

        jinli.requestApplications(request);

        Request request1 = new Request();
        request1.setRequestType("请假");
        request1.setRequestContent("小菜请假");
        request1.setNumber(4);

        jinli.requestApplications(request1);

        //加薪
        Request request2 = new Request();
        request2.setRequestType("加薪");
        request2.setRequestContent("小菜请求加薪");
        request2.setNumber(500);

        jinli.requestApplications(request2);

        Request request3 = new Request();
        request3.setRequestType("加薪");
        request3.setRequestContent("小菜请求加薪");
        request3.setNumber(1000);

        jinli.requestApplications(request3);
    }
}
